package com.bll.imple.pictureAction;

import java.io.IOException;
import java.sql.SQLException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.PageContext;

import com.bean.PictureBean;
import com.bll.Action;
import com.bll.UploadAction;
import com.dao.PictureDao;
import com.jspsmart.upload.SmartUpload;

public class ShowPictureAction implements UploadAction{

	public String execute(ServletConfig servletConfig,
			HttpServletRequest request, HttpServletResponse response) {
		HttpSession session=request.getSession();
		int userId=Integer.parseInt(session.getAttribute("userId").toString());
	    String lujing=request.getParameter("lujing");
	    PictureDao dao=new PictureDao();
	    System.out.println("userId:"+userId);
	    PictureBean bean =dao.selectOne(userId, userId);
	    System.out.println("lujing:"+lujing);
	    System.out.println("bean:"+bean);
	    request.setAttribute("bean", bean);
		return lujing;
		
	}

}

